<!DOCTYPE html>
<html>
#{include file="header.html"}#
<body class="gray-bg">
<div class="ibox float-e-margins">
    <div class="ibox-content">
      <table class="table table-hover sorttable 07fly-table">
        <thead>
          <tr>
            <th width="100">商品名称/商品规格</th>
            <th width="50"><span>销售价格</span></th>
            <th width="50"><span>数量</span></th>
            <th width="50"><span>小计</span></th>
            <th width="50"><span>备注</span></th>
          </tr>
        </thead>
        <tbody>
        </tbody>
      </table>
    </div>
  </div>
</body>
</html>
<script id="tab-1-Tpl" type="text/html">
<% for(var i=0;i<list.length;i++) { %>

	<tr>
		<td>
			<input type="hidden" name="sku_id[]" value="<%=list[i]['sku_id']%>">
			<input type="hidden" name="sku_name[]" value="<%=list[i]['sku_id']%>">
			<input type="hidden" name="goods_id[]" value="<%=list[i]['goods_id']%>">
			<input type="hidden" name="goods_name[]" value="<%=list[i]['goods_name']%>">
			<%=list[i]['goods_name']%>/<%=list[i]['sku_name']%></td>
		<td><%=list[i]['sale_price']%></td>
		<td><%=list[i]['num']%></td>
		<td><%=list[i]['goods_money']%></td>
		<td><%=list[i]['remarks']%></td>
	</tr>
<% } %>
	<tr>
		<td><strong>合计：</strong></td>
		<td></td>
		<td><strong><%=totalCount['total_num']%></strong></td>
		<td><strong><span class="text-danger">￥<%=totalCount['total_goods_money']%><span></strong></td>
		<td></td>
	</tr>
</script>
<script src="#{$smarty.const.APP}#/View/template/js/content.js?v=1.0.0"></script>
<script type="text/javascript">
$(document).ready(function () {
	var tabl_index=1;
	$.ajax({
		type: "POST",
		url: "#{$smarty.const.ACT}#/crm/SalContractList/sal_contract_list_json/",
		data:{"contract_id":"#{$contract_id}#"},
		dataType:"json",
		success: function(returnJsonData){
			var tpl=baidu.template;
			var html=tpl('tab-1-Tpl',returnJsonData);
			$(".07fly-table tbody").html(html);
		},    
		complete: function() {  },
	});
});
</script>